package com.web.sys.controller;

import java.util.List;

import javax.inject.Inject;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.web.sys.dao.ISysNavigationDao;
import com.web.sys.dao.ISysSourceDao;
import com.web.sys.model.SysNavigation;
import com.web.sys.model.SysSource;

@Controller
public class NavigationController {
	@Inject
	private ISysNavigationDao sysNavigationDao;
	@Inject
	private ISysSourceDao sysSourceDao;

	@ResponseBody
	@RequestMapping(value = "/getNavigationResource", method = RequestMethod.POST)
	public List<SysNavigation> getAllSource() {
		List<SysNavigation> list=sysNavigationDao.list(" from SysNavigation");
		return list;
	}
	@ResponseBody
	@RequestMapping(value = "/getSource", method = RequestMethod.POST)
	public List<SysSource> getSource() {
		List<SysSource> list=sysSourceDao.list(" from SysSource");
		return list;
	}

}
